package com.dfbz.netctoss.mapper;

import com.dfbz.netctoss.entity.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AccountMapper extends tk.mybatis.mapper.common.Mapper<Account> {

    @Select("select ac.* , ra.account_idcard_no recommIdcard from account ac " +
            "left join account ra " +
            "on ra.account_id = ac.account_recommender_id  " +
            "where ac.account_id = #{id}")
    Account findByAId(@Param("id") int id);

}
